# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details

pkgname=python-py010parser
_pkgname=py010parser
pkgver=0.1.18
pkgrel=7
pkgdesc='Library parsing 010 templates into an AST.'
arch=('any')
url='https://github.com/d0c-s4vage/py010parser'
license=('custom')
depends=('python' 'python-six')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('16fb76630e2db7d8f4afae82a6c5f553355abfa8150107e1970ccd23e575c3cb86dca16ecc8dba2d3a114ed223bbd8d97e05a9bfaaa207b6d56cb6ef8c57a3f5')

prepare() {
  cd $_pkgname-$pkgver
  sed -i 's/six==1.10.0/six/g' requirements.txt
}

build() {
  cd $_pkgname-$pkgver
  python setup.py build
}

package() {
  cd $_pkgname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

